We now pass NULL when the current color should be the default value of
the "color" property and we haven't looked up any value yet. This way we
don't need to look it up all the time and more importantly we can
resolve the default color, which is required because it's a
GtkCssColorValue and not a GtkCssRgbaValue.
Fixes assertions triggering at Polari startup.
g_return_val_if_fail (color != NULL, NULL);
g_return_val_if_fail (provider == NULL || GTK_IS_STYLE_PROVIDER_PRIVATE (provider), NULL);
- g_return_val_if_fail (current != NULL, NULL);
if (dependencies == NULL)
dependencies = &unused;
}
else
{
- return NULL;
+ return _gtk_css_color_value_resolve (_gtk_css_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (GTK_CSS_PROPERTY_COLOR)),
+ provider,
+ NULL,
+ 0,
+ dependencies,
+ cycle_list);
}
break;
default:
}
else
{
- current = _gtk_css_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (GTK_CSS_PROPERTY_COLOR));
+ current = NULL;
current_deps = 0;
}
}